#include "hgui.h"
#include "Button.h"
#include "WidgetManager.h"
#include "GeometryBuffer.h"

namespace hgui
{
	GUI::GUI(Platform platform) :
		mPlatform(platform)
	{
		mWidgetManager = new WidgetManager;
		switch (mPlatform)
		{
		case hgui_OPENGL:
			mGeometryBuffer = new GeometryBuffer(hgui_OPENGL);
			break;
		case hgui_DIRECTX9:
			break;
		case hgui_NULL:
			break;
		}
	}

	void GUI::initialise()
	{
		mGeometryBuffer->initialise();
	}

	GUI::~GUI()
	{
		delete mWidgetManager;
		
		mGeometryBuffer->destroy();
		delete mGeometryBuffer;
	}

	void GUI::update()
	{
		mGeometryBuffer->render();
	}
} // namespace hgui